//
//  SpecialTabBarButton.m
//  MoodDiary
//
//  Created by MoodDiary on 2020/11/26.
//

#import "SpecialTabBarButton.h"

@interface SpecialTabBarButton ()

@property (nonatomic, weak) UIImageView *imgV;

@end

@implementation SpecialTabBarButton

- (instancetype)initWithFrame:(CGRect)frame {
    if (self = [super initWithFrame:frame]) {
        
        UIImageView *imgV = [[UIImageView alloc] init];
        imgV.image = [UIImage imageNamed:@"添加日记"];
        [self addSubview:imgV];
        _imgV = imgV;

    }
    return self;
}

- (void)layoutSubviews {
    [super layoutSubviews];
    
    if (DEF_Is_FullScreen) {
        _imgV.frame = CGRectMake((self.width - 52.0) * 0.5, (DEF_Tabbar_Height - 55.0) * 0.5 - 5.0, 52.0, 55.0);
    } else {
        _imgV.frame = CGRectMake((self.width - 45.0 * 52.0 / 55.0) * 0.5, (49.0 - 45.0) * 0.5, 45.0 * 52.0 / 55.0, 45.0);
    }
    
}

@end
